import { createStore, applyMiddleware } from 'redux';
// 项目 reducer
import rootReducer from '@/store/reducers';
// 使action可以执行异步函数
import thunk from 'redux-thunk';
// 接入 redux 插件
import { composeWithDevTools } from 'redux-devtools-extension';
// 整合多个插件
const middleWares = composeWithDevTools(applyMiddleware(thunk));

const store = createStore(rootReducer, middleWares);

export default store;
